<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <div>这是div</div>
  <p>这是p</p>



  <script>
    console.log(document)

    // 修改网页标题
    document.title = 'DOM修改标题'

    const myDiv = document.querySelector('div')
    myDiv.style.color = 'red'
    console.log(myDiv)
  </script>
</body>

</html>